import {postReq,successStatus} from "@/common/request"

export const getSuccessStatus=()=>successStatus

/**字典分页查询的请求 */
export const getDictionaryPageApi=(body:PageReqParams<DictionaryType>):Promise<PageResponseData<DictionaryType>>=>postReq("/admin/dictionary/page",body)

/**字典列表查询的请求 */
export const getDictionaryListApi=(body:Partial<DictionaryType>={})=>postReq("/admin/dictionary/list",body)

/**字典新增的请求 */
export const addDictionaryApi=(body:AddOrUpdateReqParams<DictionaryType>[])=>postReq("/admin/dictionary/add",body)

/**字典更新的请求 */
export const updateDictionaryApi=(body:AddOrUpdateReqParams<DictionaryType>[])=>postReq("/admin/dictionary/update",body)

/**字典删除的请求 */
export const deleteDictionaryApi=(body:IdType[])=>postReq("/admin/dictionary/deleteByIds",body)


/**字典类别分页查询的请求 */
export const getDictionaryCategoryPageApi=(body:PageReqParams):Promise<PageResponseData<MenuType>>=>postReq("/admin/dictionaryCategory/page",body)

/**字典类别列表查询的请求 */
export const getDictionaryCategoryListApi=(body:Partial<DictionaryCategoryType>={})=>postReq("/admin/dictionaryCategory/list",body)

/**字典类别新增的请求 */
export const addDictionaryCategoryApi=(body:AddOrUpdateReqParams<DictionaryCategoryType>[])=>postReq("/admin/dictionaryCategory/add",body)

/**字典类别更新的请求 */
export const updateDictionaryCategoryApi=(body:AddOrUpdateReqParams<DictionaryCategoryType>[])=>postReq("/admin/dictionaryCategory/update",body)

/**字典类别删除的请求 */
export const deleteDictionaryCategoryApi=(body:IdType[])=>postReq("/admin/dictionaryCategory/deleteByIds",body)